ST Blank - The Monitor Protector : Version 2.0.0 ================================================ (c) Copyright 1989, 1990, 1991, 1992, 1993 Mathew Lodge. This program is NOT public domain, but you are free to copy it as long as this text file accompanies the executable program and resource file. This program may not be sold. Abstract ======== ST Blank is a utility to blank your monitor screen after a user definable period of inactivity. Installation ============ ST Blank comes in two parts: An AUTO folder program, STBLPRG.PRG, a control program, STBLACC.ACC, and the resource for the control program STBLANK.RSC. STBLPRG.PRG should be placed in the AUTO folder of your boot disk. The control program can be used as a desk accessory by placing STBLACC.ACC and STBLANK.RSC in the root directory of your boot disk. Your ST must be then rebooted before ST Blank will be installed. The control program can also be run as a stand alone program, simply by renaming it from STBLACC.ACC to STBLACC.PRG. Make sure that STBLANK.RSC is in the same directory as the program, and then double-click STBLACC.PRG. Use === Selecting the ST Blank item from the desk menu (or double clicking STBLACC.PRG) allows you to set the various parameters of ST Blank. This includes the delay before blanking in minutes and seconds. Blanking occurs when the ST has been inactive for this user definable amount of time. The program defines activity as mouse movement and clicks, key depression and release, and BIOS character output to any device other than the intelligent keyboard controller, IKBD. From the dialogue you can also make the screen blank immediately, and turn blanking off. Underneath the "Star Display Options" you can set whether you want a star-trek type display when the screen is blanked (more information on this below). The speed of the star display is also configurable - the higher the speed number, the slower the star display. The "Test" button blanks the screen straight away (without removing the dialogue) to allow easy testing of different star speeds. While the screen is blanked, you get a display of stars similar to that used in innumerable space games, as if travelling through space. (This idea is shamelessly blagged from the Macintosh screen saver "Stars!" at the request of Steve Cassidy). The speed of the star display is configurable (see above). Any activity (definition of "activity" given above) will restore the screen and continue. Clicking upon the "ST Blank" title text displays a dialogue containing various information and a thumbnail sketch of the author! This accessory works in ALL screen resoltions currently supported by the standard ST(E) architecture (i.e. 320x200, 640x200 and 640x400 - NOT "Autoswitch Overscan" modes, Mega Screens or the new screen modes of the TT and Falcon). ST Blank works on the TT (though regrettably only in ST screen modes -- see "In the pipeline" below) and copes with all 680x0 processors. ST Blank has been extensively tested with various beta releases of MultiTOS and found to work perfectly. It has not been tested on the Falcon, because I can't find anyone who actually has one! When the AUTO folder program starts up, it attempts to read the file STBLANK.INF from the boot device (usually A: for those booting from floppy, or C: for hard drive owners). This file contains all the configuration information. If this file does not exist, an error message will be printed, but sensible defaults will be installed. Using the controlling accessory, you can save your own configuration by clicking on the "Save" button, and it will be used next time you restart your ST. You can also re-load your configuration at any time with the "Load" button. If any errors occur during initialisation (e.g. can't find memory resident part of ST Blank or no resource file), then you won't get the ST Blank title on the Desk menu, but the accessory won't crash your machine. It will, however, take up memory space. An error message or alert will explain what went wrong. ST Blank was written in 68000 assembly language to make it as compact as possible. I feel that all memory resident programs should be as small as possible - I had a 520ST for a few years, and was appalled at the huge size of one poor screen saver. ST Blank has grown as features have been added, but I hope that it is still small and useful enough to take a regular place in your AUTO folder / accessory menu. Known Problems ============== POOLFIX3 and POOLFIX4 : Both these programs (that fix a bug in the GEMDOS memory manager of TOS 1.4) like to run first in your AUTO folder. Don't try to put STBLPRG.PRG (or any other program) before them -- you'll get a system crash. TEMPUS and TEMPUS2 : When normal operation is resumed after screen blanking, Tempus' on-screen clock will increment wildly and finally settle at the wrong time. This is a bug in Tempus, not ST Blank. In Tempus 2, you can avoid this by using Tempus' own screen blanking feature instead of ST-Blank. You'll have to forgo the star display though, and rely on Tempus' screen blanking method of disabling video synchronisation. The Tempus method will damage some monitors in the long run, as they hunt for a display signal to lock onto (this is characterised by monitor "scream"). Atari USA have stated that the Atari range of monitors can be damaged in this way. MEGAROIDS and SMALLTALK-80 : Megamax Megaroids and Smalltalk-80 install their own IKBD packet handlers and so ST Blank will cut in when the timer expires (it never gets to see any mouse movements or keypresses). At this point, the only option is to reset, because ST Blank cannot detect any activity to cancel the star display. Remember to disable ST Blank before using either of these programs. NEOCHROME MASTER : This program hacks wildly into the innards of your machine, and does rather strange things with the keyboard and mouse packet handlers. Besides this, NeoChrome Master is an illegal derivative work of copyright Atari code -- don't use it. In the pipeline =============== A list, in no particular order, of the enhancements planned (when (if?) I have time): 1) A CPX version of the controlling accessory. 2) A version that supports arbitrary video modes (TT, big screens, Falcon modes, etc.) 3) A smoother star display. 4) A MiNT aware version of the .PRG that communicates via a pipe, rather than shared memory. 5) Slot-in modules to replace the standard star display Technical Info. =============== The program tries to avoid blanking the screen in the middle of disk access, but since there's no foolproof way of checking (even looking at flock at $43E doesn't work all of the time), this can happen. On the ST, all disk I/O is done via Direct Memory Access, which means that ST Blank cannot interefere with data being transferred. During testing and in the three years since the first release there have been no reported corruption problems, but obviously this cannot be guaranteed. If anyone knows a foolproof method of testing for ongoing floppy/hard disc access, then please let me know. Any character output via the BIOS Bconout routine is counted as "activity". This was added to prevent ST Blank cutting in during printing and file transfer. However, if the file transfer is all one way (i.e. into the ST) then ST Blank will still cut in. I believe that this is not the case with most popular file transfer protocols (Kermit, X-,Y-, Z-Modem etc.) Note that if a program has its own device drivers that do not call the BIOS (e.g. serial port driver of First Word (Plus), "Printer (direct)" driver of That's Write and Write On), then ST Blank won't know about the output. This program installs four of its own exception handlers: 1) The IKBD interrupt vector (see XBIOS 34 (Kdbvbase), IKBDSYS vector). 2) MFP level 5 interrupt, Timer C (200Hz system timer). 3) One slot in the VBL queue. 4) BIOS TRAP (#13) vector. All the handlers use the XBRA protocol, and execute the "old" interrupt handler when they have done their stuff (which doesn't take long on any of the interrupts). I have also attempted to make the whole program "well behaved" by adhering to any ST programming standards that apply (eg XBRA protocol, Cookie Jar). The AUTO folder program installs a Cookie, with ID "STBl" and a value that is a pointer to its shared data area. If no Cookie Jar is installed in the machine, ST Blank installs the standard jar plus the ST Blank Cookie. This program was written in 68000 Assembly code, using the Tempus 2 editor and Metacomco Macro Assembler V 12.00. The resource was constructed using both Kuma's K-Resource 2 and HiSoft WERCS. All four products are highly recommended. Memory Usage ============ ST Blank tried to use as little memory as possible -- for example, the AUTO folder program overlays its initialisation code with its screen, palette and Cookie Jar buffers (once initialisation is over, the code is no longer required). Because the program uses techniques such as these, it is impossible to determine the exact amount of memory used -- it will vary depending on your installation. However, the AUTO folder program uses roughly 40K of memory (interrupt handlers plus screen buffer). The memory used by the controlling accessory is roughly 8K. However, when running under MultiTOS, the accessory seems to take up much more than 8K, according to the data in U:\PROC. I have no idea why, but it could be related to MiNT's use of 8K pages for memory allocation. Version Information =================== Version 1.0.1 Mainly code changes to improve application compatibility. Version 1.0.2 Own point plotting routines instead of using A-Line, and a vastly enlarged stack which improved application compatibilty remarkably. Version 1.1.0 The speed of the star display is now configurable, and the full version number is now displayed on the accessory's menu slot. Also, changes were made to internal data structures so that the program will run on STs with a full 32-bit address bus (i.e. the TT). Verison 1.2.0 Some tidying of code, vastly improved XBRA installation routines, and BIOS TRAP intercepted to detect character output to all devices _except_ IKBD. This prevents the screen blanker cutting in during file transfer or printing and screwing things up. It also makes ST Blank compatible with the SGS-net MIDI network system. Improved installation code means that ST Blank does not cause crashes when you change resolution. Version 1.2.1 IKBD interrupt handler added, making old mouse interrupt handler routine obsolete, and allowing detection of _ALL_ key presses (and releases) as well as mouse clicks. The program now always "sees" all keypresses (before it missed more often than it hit, and depresion of the Caps Lock, Control, Shift and Alternate keys was not detected.) This removes problems encountered when using the Gul„m shell and a very short blank delay time. Version 1.2.2 ST Blank now displays an error message at boot-up if it cannot install itself, telling you what the problem is. Version 1.2.3 Bug fixed in BIOS intercept that caused (at least) the G+PLUS accessory to crash. Version 1.3.0 Save / Load configuration facility added, forcing code structure changes in the installation phase. Version 1.3.1 Modification made to BIOS TRAP intercept to account for the increased stack frame size on 68010, '020, '030 and '040 processors. Version 2.0.0 Functionality split into two parts, AUTO folder program and accessory/program, to solve resolution change problems on the TT. Screen, palette and Cookie jar buffers are overlaid on top of initialisation code to minimise memory usage. AUTO folder program installs a Cookie. Stars re-implemented using 200Hz interrupt to ensure constant star speed irrespective of processor clock speed. AUTO program will now expand the VBL queue if it cannot find a free slot. "Test" button added to dialogue of controlling acc/prg, and dialogue redesigned. Version 2.0.1 Bug fixed that caused bombs if the .INF file was not present in the root directory at boot-up. Resource file tidied up and fixed so that it worked in low and medium resolution. Code to access the "About" dialogue added. (It's been in the resource for some time, but you'd only have found it if you loaded the resource file into a resource editor!) Thanks ====== Thank you to: Steve Cassidy : Who asked for it in the first place! Dave Wade : STE testing and helpful comments. Leroy J. Dickey : Bug report and suggestions for useful improvements. L. R. Henry : For posting ST Blank to comp.binaries.atari.st back : in the days when I couldn't. Stuart Boutell : TT testing and free lunches! And the to those readers of comp.sys.atari.st(.tech) who said what they liked (and didn't like) in ST Blank, and who gave many helpful comments and suggestions. Any comments, bug reports, money (?) or requests for improvements to: Mathew Lodge Snail Mail E-mail (until July 1993): ========== ========================= "Maen Melin" World: mjl-b@minster.york.ac.uk Holmes Chapel Road UUCP : ...!uknet!minster!mjl-b Lach Dennis Other:mjl-b%minster.york.ac.uk@nsfnet-relay.ac.uk Northwich Cheshire CW9 7SZ United Kingdom 27 January 1993